package com.de.qrcode;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class QrcodeController {
    @RequestMapping("/qrcode")
    public String qrcode(Model model){
        String base64=QrcodeUtil.getBase64QRCode("https://www.baidu.com",400,400);
        model.addAttribute("base64image","data:image/jpg;base64,"+base64);
        return "qrcode";
    }
}
